
#pragma once

#include "../Main.h"

#include "Controller_ModalDialog.h"
#include "Controller_Screen_Editor.h"

class Widget;
class DialogPanel;
class TextEditor;

typedef void(*ClickCallback)(void* pUserData);

class Controller_ModalColourPickerDialog
{
	public:
		
		static void Initialise();
		static void Update();
		static void Shutdown();
		
		static void Show();
		static bool IsActive() { return ( s_pxDialogPanel != 0 ); }
		static void SetCallback( void( * pfnCallback )( const Controller_ModalDialogResult, void* ), void* pCallbackUserData );
	
		static void SetColour( u_int uColour ) { s_uColour = uColour; }
		static u_int GetColour() { return s_uColour; }
		
	private:
		
		static void OKCallback( void* pUserData );
		static void CancelCallback( void* pUserData);
		
		static void Destroy();
		
		static void* s_pCallbackUserData;
		static void( * s_pfnCallback )( const Controller_ModalDialogResult, void* );
		
		static DialogPanel* s_pxDialogPanel;
		static Panel*		s_pxColourSwatch;
		
		static TextEditor*	s_pxTextEditorRed;
		static TextEditor*	s_pxTextEditorGreen;
		static TextEditor*	s_pxTextEditorBlue;
		static TextEditor*	s_pxTextEditorAlpha;
	
		static bool s_bDestroy;
									 
		static u_int s_uColour;
	
};

//eof
